@extends('layouts.app')

@section('title','TrainsOrderList')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <header class="list-header">
                    <section>培训订单管理</section>
                </header>
                <table class="table table-hover table-striped list-table">
                    <tr class="list-table-tr">
                        <th>用户名</th>
                        <th>用户电话</th>
                        <th>用户职业</th>
                         <th>报名次数</th>
                        <th>用户id</th>
                        <th class="text-right">Operation</th>
                    </tr>

                    @foreach($trainOrder as $v)
                        <tr>
                            <td>{{ $v->username }}</td>
                            <td>{{$v->phone}}</td>
                            <td>{{$v->professional}}</td>
                            <td>{{$v->counts}}</td>
                            <td>{{$v->user_id}}</td>
                            <td class="text-right">
                                <a  href="{{ URL('admin/trainOrder/'.$v->id.'/edit') }}" class="edit">
                                    <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i>
                                </a>
                                <form action="{{ URL('admin/trainOrder/'.$v->id) }}" method="POST" style="display: inline;">
                                    <input name="_method" type="hidden" value="DELETE">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <button type="submit" class="delete"><i class="fa fa-trash-o fa-lg" aria-hidden="true"></i></button>
                                </form>
                            </td>
                            
                        </tr>
                    @endforeach
                </table>
                <hr>
                {!! $trainOrder->render() !!}
                  
            </div>
        </div>
    </div>
@endsection